jQuery.validator.addMethod("time", function(value, element) {   
    var time = /^([0-1]?[0-9]|2[0-3]):([0-5][0-9])$/;
    return this.optional(element) || (time.test(value));
}, "请正确填写时间");

jQuery.validator.addMethod("isTell", function(value, element) {   
    var tel = /^(13[0-9]|14[0-9]|15[0-9]|17[0-9]|18[0-9])\d{8}$/;
    return this.optional(element) || (tel.test(value));
}, "请填写正确的手机号");

jQuery.validator.addMethod("isPlateNum", function(value, element) {   
    var isplate = /^[\u4e00-\u9fa5]{1}[A-Za-z]{1}[A-Za-z0-9]{4,4}[\u4e00-\u9fa5A-Za-z0-9]{1}$/;
    return this.optional(element) || (isplate.test(value));
}, "输入正确格式车牌号，如：鲁HN5675");
jQuery.validator.addMethod("isVinCode", function(value, element) {   
    var vin = /[A-Za-z]\w{16}$/;
    return this.optional(element) || (vin.test(value));
}, "请输入正确的VIN码");
jQuery.validator.addMethod("isPrice", function(value, element) {   
    var price = /^\+?(?!0+(\.00?)?$)\d+(\.\d\d?)?$/;
    return this.optional(element) || (price.test(value));
}, "请输入正确的价格");
jQuery.validator.addMethod("isPricePlusNotNull", function(value, element) { 
	if(!value) {
		return false;
	}
	if(value == "0" || value == "0.0" || value == "0.00") {
		return true;
	}
	if(value.indexOf(".") == -1 && value.length > 4) {
		return false;
	}
	var length = value.replace(".","").length; 
	var reg = /^\+?(?!0+(\.00?)?$)\d+(\.\d\d?)?$/;
	return this.optional(element) || (length < 7 && reg.test(value)); 
	}, "价格格式错误，支持输入四位整数+两位小数");
jQuery.validator.addMethod("isPricePlus", function(value, element) { 
	if(!value) {
		return true;
	}
	if(value == "0" || value == "0.0" || value == "0.00") {
		return true;
	}
	if(value.indexOf(".") == -1 && value.length > 4) {
		return false;
	}
	var length = value.replace(".","").length; 
	var reg = /^\+?(?!0+(\.00?)?$)\d+(\.\d\d?)?$/;
	return this.optional(element) || (length < 7 && reg.test(value)); 
	}, "价格格式错误，支持输入四位整数+两位小数");
jQuery.validator.addMethod("isShowMileageNotNull", function(value, element) { 
	if(!value) {
		return false;
	}
	if(value == "0" || value == "0.0" || value == "0.00") {
		return true;
	}
	if(value.indexOf(".") == -1 && value.length > 4) {
		return false;
	}
	var length = value.replace(".","").length; 
	var reg = /^\+?(?!0+(\.00?)?$)\d+(\.\d\d?)?$/;
	return this.optional(element) || (length < 7 && reg.test(value)); 
	}, "格式错误，支持输入四位整数+两位小数");
jQuery.validator.addMethod("isPositiveNumber", function(value, element) { 
	var aint = parseInt(value);	
    return aint > 0 && (aint + "") == value;  
	}, "请输入正整数");

